package com.yellowpage.wf.data;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import static javax.persistence.GenerationType.SEQUENCE;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;

import java.util.Date;

/**
 * Context entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "WF_ATTACHMENT")
public class Attachment implements java.io.Serializable {

	// Fields

	private Long attachmentId;
	private String name;
	private String type;
	private Long workflowId;
	private Long resourceId;
	private String description;
	private Long createUser;
	private Date createTime;

	// Constructors

	/** default constructor */
	public Attachment() {
	}

	/** full constructor */
	public Attachment(String name, String type, Long workflowId,Long resourceId, String description, Long createUser, 
			Date createTime) {
		this.name = name;
		this.type = type;
		this.workflowId = workflowId;
		this.resourceId = resourceId;
		this.description = description;
		this.createUser = createUser;
		this.createTime = createTime;
	}

	// Property accessors
	@GenericGenerator(name = "generator", strategy = "identity")
	@Id
	@GeneratedValue(generator = "generator")
	@Column(name = "ATTACHMENT_ID", unique = true, nullable = false, precision = 18, scale = 0)
	public Long getAttachmentId() {
		return attachmentId;
	}
	public void setAttachmentId(Long attachmentId) {
		this.attachmentId = attachmentId;
	}
	@Column(name = "NAME", length = 128)
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	@Column(name = "TYPE", length = 16)
	public String getType() {
		return type;
	}
	public void setType(String type) {
		this.type = type;
	}
	@Column(name = "WORKFLOW_ID", precision = 18, scale = 0)
	public Long getWorkflowId() {
		return this.workflowId;
	}
	public void setWorkflowId(Long workflowId) {
		this.workflowId = workflowId;
	}
	@Column(name = "RESOURCE_ID", precision = 18, scale = 0)
	public Long getResourceId() {
		return resourceId;
	}
	public void setResourceId(Long resourceId) {
		this.resourceId = resourceId;
	}
	@Column(name = "DESCRIPTION", length = 128)
	public String getDescription() {
		return description;
	}
	public void setDescription(String description) {
		this.description = description;
	}
	@Column(name = "CREATE_USER", precision = 18, scale = 0)
	public Long getCreateUser() {
		return createUser;
	}
	public void setCreateUser(Long createUser) {
		this.createUser = createUser;
	}
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "CREATE_TIME", length = 7)
	public Date getCreateTime() {
		return createTime;
	}
	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}
	
}